package com.example.service.util.utils;

import com.example.common.util.constant.OrderConstants;

import java.util.Map;

/**
 * @Author juzipi
 * @Date 2021/7/30 8:54
 * @Info 邮件模板
 */
public class MailTemplateUtils {


    /**
     * 获取邮件模板
     * @param data
     * @return
     */
    public static String patientMailTemplate(Map<String,Object> map){
        String title = map.get(OrderConstants.TITLE).toString();
        String reserveDate = map.get(OrderConstants.RESERVE_DATE).toString();
        String name = map.get(OrderConstants.NAME).toString();
        String content = "<h3>尊敬的【"+name+"】,您于【"+reserveDate+"】预约的【"+title+"】即将开始就诊,请您及时做好准备</h3>";
        return content;
    }


    /**
     * 预约更新通知邮件
     * @param map
     * @return
     */
    public static String reserveRenewMailTemplate(Map<String, Object> map) {
        String title = map.get(OrderConstants.TITLE).toString();
        String reserveDate = map.get(OrderConstants.RESERVE_DATE).toString();
        String name = map.get(OrderConstants.NAME).toString();
        String content = "<h3>尊敬的【"+name+"】,"+title+"可预约数更新啦，开来看看吧。——"+reserveDate+"</h3>";
        return content;
    }
}
